package main

import (
	"question-answer/models"
	_ "question-answer/routers"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"
)

func init() {

	orm.RegisterDataBase("default", "mysql", "root:@/question_answer_db?charset=utf8", 30)
	orm.RegisterModel(
		new(models.UserInfo))
	orm.RunSyncdb("default", false, true)
	orm.Debug = true //打开查询日志
}

func main() {
	beego.Run()
}
